package com.lyfei.yd.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.lyfei.yd.mapper.SysRoleMapper;
import com.lyfei.yd.domain.entity.SysRole;
import org.springframework.stereotype.Service;

@Service("sysRoleService")
public class SysRoleService extends BaseService<SysRoleMapper, SysRole> {

    public SysRole getByRoleKey(String roleKey){
        QueryWrapper<SysRole> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("role_key", roleKey);
        return this.getOne(queryWrapper);
    }
}
